#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2025/2/2 11:46
# @Author  : Ramsey
# @Site    : zh
# @File    : baidu_keyword.py
# @Software: PyCharm
from spider_framework.spider import Spider
from spider_framework.http.request import Request


class BaiduKeywordSpider(Spider):
    start_urls = ["https://www.baidu.com", "https://www.baidu.com"]

    def parse(self, response):
        print(f"parse_keyword: {response}")
        for _ in range(10):
            url = "https://www.baidu.com"
            yield Request(url=url, callback=self.parse_page)

    def parse_page(self, response):
        print("parse_keyword_page: ", response)
        for _ in range(10):
            url = "https://www.baidu.com"
            yield Request(url=url, callback=self.parse_detail)

    @staticmethod
    def parse_detail(response):
        print("parse_keyword_detail: ", response)


if __name__ == "__main__":
    pass
